package com.example.springbott.wx_controller;

import com.example.springbott.bean.BaseRespVo;
import com.example.springbott.bean.MarketBrand;
import com.example.springbott.bean.zeng.WxBrandDetailVo;
import com.example.springbott.wx_service.WXBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zeng
 * @Description:
 * @date: 21:27 2022/11/22
 */
@RestController
@RequestMapping("wx/brand")
public class WXBrandController {
    @Autowired
    WXBrandService wxBrandService;

    @RequestMapping("detail")
    public BaseRespVo detail(Integer id) {
        MarketBrand marketBrand = wxBrandService.detail(id);
        return BaseRespVo.ok(marketBrand);
    }

    @RequestMapping("list")
    public BaseRespVo list(Integer page, Integer limit) {
        WxBrandDetailVo wxBrandDetailVo = wxBrandService.list(page, limit);
        return BaseRespVo.ok(wxBrandDetailVo);
    }
}
